package com.bufbomb.datastore;

import java.io.IOException;

import javax.servlet.http.*;

@SuppressWarnings("serial")
public class StoreServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
		throws IOException {
		/*UserService userService = UserServiceFactory.getUserService();
		User user = userService.getCurrentUser();			
		if (user == null) 
		{
			resp.getWriter().println("Welcome, guest<p>");
			resp.getWriter().println("<a href='" + userService.createLoginURL(req.getRequestURI()) + "'>Sign in</a>");
		}else
		{
			resp.getWriter().println("Welcome, " + user.getEmail() + "<p>");
			resp.getWriter().println("<a href='" + userService.createLogoutURL("/") + "'>Sign out</a>");
			resp.getWriter().println("<br />");
			String html = getUserBlobHTML(user);
			resp.getWriter().println(html + "<br />");
		}*/
		return;
	}
	
	/*public String getUserBlobHTML(User u)
	{
		StringBuilder sb = new StringBuilder();
		ArrayList<BlobKey> blobs = StoreController.getBlobs(u);
		if(blobs == null)
		{
			sb.append("Currently no blobs.");
		}else
		{
			for(BlobKey k : blobs)
			{
				sb.append(k.getKeyString() + " ");
			}
		}
		return sb.toString();
	}*/
}
